from flask import Flask, render_template, request

app = Flask(__name__)


# @app.route('/')
# def hello_world():
#    return 'Hello World'
# @app.route('/index')
# def hello():
#    s='依古比古'
#   ls=['飞飞鱼','叮叮车','小点点']
#  return render_template('hello.html', mys=s,myls=ls)

@app.route('/')
def index():
    return render_template('login.html')


@app.route('/login', methods=['get','post'])
def login():
    username = request.form.get('myname')
    userpwd = request.form.get('mypwd')
    if username == 'ygbg' and userpwd == '111':
        return "登陆成功"
    else:
        return render_template('login.html')


if __name__ == '__main__':
    app.run(debug=True)
